
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
          <?php
          $this->load->view('panggil_css');
          $this->load->view('panggil_js');
          $this->load->view('header');
          ?>
          <title>topik</title>
     </head><body>
          <ul class="breadcrumb">
               <li>
                    <a href="#">Topik</a> <span class="divider">/</span>
               </li>
               <li>
                    <a href="#">Tanya</a> <span class="divider">/</span>
               </li>
               <li class="active">Jawab</li>
          </ul>
          <div class="container-fluid">
               <div class="row-fluid">
                    <div class="span2">

                    </div>
                    <div class="span9">

                         <div class="tabbable tabs-left">
                              <ul class="nav nav-tabs">
                                   <li class="active">
                                        <a href="#1" data-toggle="tab" rel="tooltip" title="Jawaban paling akurat" id="tooltip"><?php echo $cosine_arr_max['judul_sim']; ?></a>
                                   </li>


                                   <?php
                                   for ($a = 1; $a < count($cosine_arr_next); $a++) {
                                   ?>
                                        <li>
                                             <a href="<?php echo "#" . $cosine_arr_next[$a][0]; ?>" data-toggle="tab"><?php echo $cosine_arr_next[$a][1]; ?></a>
                                        </li>
                                   <?php
                                   }
                                   ?>

                              </ul>

                              <div class="tab-content">
                                   <div class="tab-pane active" id="1">
                                        <div class="alert alert-info">
                                             <h4 class="alert-heading">Topik: <?php echo "" . $judul; ?></h4>
                                             <?php
                                             echo $data_deskripsi;
                                             ?>
                                        </div>
                                        <div class="alert">
                                             <h4 class="alert-heading">Jawab: <?php echo "" . $cosine_arr_max['judul_sim']; ?>, Tingkat Similaritas: <?php echo $cosine_arr_max['max_sim']; ?></h4>
                                             <b>Apakah kasus anda sama / mirip / sejenis dengan kasus di bawah ini?</b> <br>
                                             <p><?php
                                             echo $cosine_arr_max['kasus_sim'];
                                             ?></p>
                                        </div>
                                        <div class="alert alert-success">
                                             <b>Apabila mirip, maka jawabnya adalah:</b> <br>
                                             <p><?php
                                                  echo $cosine_arr_max['jawab_sim'];
                                             ?></p><br><br> <b>Apabila belum cocok, lihat rekomendasi jawaban lainnya!!!</b>
                                        </div>
                                   </div>

                                   <?php for ($a = 1; $a < count($cosine_arr_next); $a++) {
                                   ?>
                                                       <div class="tab-pane" id=<?php echo "" . $cosine_arr_next[$a][0] ?>>
                                                            <div class="alert alert-info">
                                                                 <h4 class="alert-heading">Topik: <?php echo "" . $judul; ?></h4>
                                             <?php
                                                       //pertanyan
                                                       echo "" . $data_deskripsi;
                                             ?>
                                                  </div>
                                                  <div class="alert">
                                                       <h4 class="alert-heading">Jawab: <?php echo "" . $cosine_arr_next[$a][1]; ?>, Tingkat Akurasi: <?php echo "" . $cosine_arr_next[$a][2]; ?></h4>
                                             <?php
                                                       //jawaban
                                                       echo "" . $cosine_arr_next[$a][4];
                                             ?>
                                                  </div>

                                                  <div class="alert alert-success">
                                                       <b>Apabila mirip, maka jawabnya adalah:</b> <br>
                                                       <p><?php
                                                       echo "" . $cosine_arr_next[$a][3];
                                                       ?></p><br><br> <b>Apabila belum cocok, lihat rekomendasi jawaban lainnya!!!</b>
                                             </div>

                                        </div>
                                   <?php } ?>

                                             </div>

                                        </div>

                                   </div>
                              </div>
                              <div class="form-actions">

                              </div>
                         </div>


                    </body></html>
<?php
//print_r($cosine_tfidf_arr_max);
//echo "<br>";
//print_r($cosine_tfidf_arr_next);
//echo "<br>";
//print_r($cosine_arr_max);
//echo "<br>";
//print_r($cosine_arr_next);
//echo "<br>";
//foreach ($array_token as $row){
//     echo $row."<br>";
//}
?>